﻿<Window x:Class="DataBinding.DataGridRowDetails"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="DataGridRowDetails" Height="300" Width="300"
        xmlns:local="clr-namespace:DataBinding">

    <Window.Resources>        
        <local:ImagePathConverter x:Key="ImagePathConverter"></local:ImagePathConverter>
    </Window.Resources>
    
    <Grid>
        <DataGrid x:Name="gridProducts" Margin="5" AutoGenerateColumns="False"
		RowDetailsVisibilityMode="VisibleWhenSelected">
            <DataGrid.RowDetailsTemplate>
                <DataTemplate>
                    
                        <Border Margin="10" Padding="10" BorderBrush="SteelBlue" BorderThickness="3" CornerRadius="5">
                            <TextBlock Text="{Binding Description}" TextWrapping="Wrap" FontSize="10" MaxWidth="300" TextAlignment="Left"></TextBlock>
                        </Border>
                    
                </DataTemplate>
            </DataGrid.RowDetailsTemplate>
            <DataGrid.Columns>
                <DataGridTextColumn Header="Product" Width="175" Binding="{Binding ModelName}"></DataGridTextColumn>
                <DataGridTextColumn Header="Price" Binding="{Binding UnitCost, StringFormat={}{0:C}}"></DataGridTextColumn>
                <DataGridTextColumn Header="Model Number" Binding="{Binding ModelNumber}"></DataGridTextColumn>


            </DataGrid.Columns>
        </DataGrid>
    </Grid>
</Window>
